package cn.com.dhcc.ddi.datamapping.vo.wapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import cn.com.dhcc.app.core.handler.dbhandler.WappedResultSet;
import cn.com.dhcc.ddi.datamapping.vo.DataMapping;

public class DataMappingRowWapper implements RowMapper<DataMapping>{

	@Override
	public DataMapping mapRow(ResultSet rss, int rowNum) throws SQLException {
		WappedResultSet rs = new WappedResultSet(rss);
		DataMapping vo = new DataMapping();
		
		vo.setDestDsId(rs.getString("dest_ds_id"));
		vo.setId(rs.getString("id"));
		vo.setMappingName(rs.getString("mapping_name"));
		vo.setMappingType(rs.getString("mapping_type"));
		vo.setMtime(rs.getTimestamp("mtime"));
		vo.setSrcDsId(rs.getString("src_ds_id"));
		vo.setStatus(rs.getString("status"));
		vo.setSrcDsName(rs.getString("srcDsName"));
		vo.setDestDsName(rs.getString("destDsName"));
		vo.setRemark(rs.getString("remark"));
		return vo;
	}

}
